package com.fashion.model;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * User: gnyk
 * Date: 13-2-17
 */
@Entity
@Table
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class CollectedNews implements Serializable {
    @Id
    @Column
    private String id;
    @Column
    private String title;
    @Column
    private String introduction;
    @Column
    private String body;
    @Column
    private String source;
    @Column
    private Date createDate;

    @Column
    private String sourceLink;

    public CollectedNews(String id, String title, String introduction, String body, String source,String sourceLink, Date createDate) {
        this.id = id;
        this.title = title;
        this.introduction = introduction;
        this.body = body;
        this.source = source;
        this.sourceLink = sourceLink;
        this.createDate = createDate;
    }

    public CollectedNews() {
    }

    public CollectedNews(String id, String title) {
        this.id = id;
        this.title = title;
    }

    public CollectedNews(String id, String title, String introduction, String source,String sourceLink, Date createDate) {
        this.id = id;
        this.title = title;
        this.introduction = introduction;
        this.source = source;
        this.sourceLink = sourceLink;
        this.createDate = createDate;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getIntroduction() {
        return introduction;
    }

    public void setIntroduction(String introduction) {
        this.introduction = introduction;
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }


    public String getSourceLink() {
        return sourceLink;
    }

    public void setSourceLink(String sourceLink) {
        this.sourceLink = sourceLink;
    }

}
